<!DOCTYPE html> 
<html lang="ja"> 
    <head> 
        <meta charset="utf-8"> 
        <title>Circle Test | TM Lib</title>
        
        <style>
            body { font-family: "Meiryo", "メイリオ", "ヒラギノ角ゴ Pro W3", sans-serif; }
            
            #content {
                display: -webkit-box;
                display: -moz-box;
                display: -o-box;
                display: box;
            }
            
            #content>* {
                padding: 10px 20px;
                width: 50%;
                -webkit-box-sizing: border-box;
                -moz-box-sizing: border-box;
                -o-box-sizing: border-box;
                box-sizing: border-box;
            }
            
            canvas {
                box-shadow: 0px 0px 4px 0px #aaa;
            }
        </style>
        
        <script type="text/javascript" src="./../../src/tmlib.js"></script>
        <script id="test-script">
            TM.loadScript("geom", "circle");
            
            /*
             * Rectangle Test
             */
            TM.main(function()
            {
                // コンソール
                var c = TM.DebugConsole("#console");
                //var c = console; // コンソールの方に出力
                
                // コンテキスト取得
                var ctx = TM.$id("c").getContext("2d");
                
                // circle test
                c.group("【rectangle test】");
                var circle = TM.$Circle(50, 50, 25);
                
                c.log("TM.$Circle(50, 50, 25) : ", circle.x, circle.y, circle.radius);
                ctx.beginPath();
                ctx.arc(circle.x, circle.y, circle.radius, 0, Math.PI*2, false);
                ctx.fill();
                
                c.groupEnd();
            });
        </script>
        
        <script>
            TM.addNamespace("prettify", "./../../plugins/prettify");
            TM.loadPrettify();
            
            TM.main(function(){
                TM.$id("code").innerText = TM.$id("test-script").innerText;
                prettyPrint();
            });
        </script>
    </head>
    
    <body>
         
        <h1>Circle Test | TM Lib</h1>
        
        <div id="content">
            <section>
                <h2>Canvas</h2>
                <canvas id="c"></canvas>
                <h2>Console</h2>
                <pre id="console" class="prettyprint"></pre>
            </section>
            <section>
                <h2>Code</h2>
                <pre id="code" class="prettyprint"></pre>
            </section>
        </div>
        
        
    </body>
</html>
